package com.shanpin.shebao.model;

/**
 * 多值返回
 * @author 品讯科技
 *
 * @param <T>
 */
public class ServiceResult<T> {
	
	public String msg = "";
	public T result;
	
	private ServiceResult() {
		
	}
	
	public static <T> ServiceResult<T> valueOf(String msg) {
		ServiceResult<T> sr = new ServiceResult<>();
		sr.msg = msg;
		return sr;
	}
	
	public static <T> ServiceResult<T> valueOf(String msg, T t) {
		ServiceResult<T> sr = new ServiceResult<>();
		sr.msg = msg;
		sr.result = t;
		return sr;
	}

	public static <T> ServiceResult<T> valueT(T t) {
		ServiceResult<T> sr = new ServiceResult<>();
		sr.result = t;
		return sr;
	}
	
}
